package com.qf.controller;

import com.qf.entity.SysUser;
import com.qf.service.SysUserService;
import com.qf.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;


    @RequestMapping("/login")
    public R login(@RequestBody SysUser sysUser){
       String token =  sysUserService.login(sysUser);
        System.out.println(token);
       return R.ok(token);
    }
}
